﻿using Dapper;
using System;
using BCEntity.TMS.TransportOrder;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading.Tasks;

namespace BCData.TMS.TransportOrder
{
	/// <summary>
	/// 运输订单
	/// </summary>
	public interface ITransportOrderData
	{
		#region  成员方法
		/// <summary>
		/// 是否存在该记录
		/// </summary>
		/// <param name="transportOrderId">运输订单Id</param>
		Task<bool> Exists(long transportOrderId);
		/// <summary>
		/// 增加运输订单
		/// </summary>
		/// <param name="entity">运输订单信息</param>
		Task<TransportOrderEntity> Add(TransportOrderEntity entity);
		/// <summary>
		/// 更新运输订单
		/// </summary>
		/// <param name="entity">运输订单信息</param>
		Task<TransportOrderEntity> Update(TransportOrderEntity entity);
		/// <summary>
		/// 删除运输订单
		/// </summary>
		/// <param name="transportOrderId">运输订单Id</param>
		Task<bool> Delete(long transportOrderId);
		/// <summary>
		/// 获取运输订单
		/// </summary>
		/// <param name="transportOrderId">运输订单Id</param>
		Task<TransportOrderEntity> GetEntity(long transportOrderId);
		/// <summary>
		/// 获取运输订单列表
		/// </summary>
		Task<IEnumerable<TransportOrderEntity>> GetList();
		/// <summary>
		/// 获取运输订单分页列表
		/// </summary>
		/// <param name="start">开始时间</param>
		/// <param name="end">结束时间</param>
		/// <param name="sortName">排序字段</param>
		/// <param name="ascending">升序</param>
		/// <param name="pageIndex">当前页码</param>
		/// <param name="pageSize">每页数据条数</param>
		Task<(IEnumerable<TransportOrderEntity>, int)> Query(DateTime? start, DateTime? end, string sortName, bool? ascending, int pageIndex, int pageSize);
		#endregion  成员方法
	}


}